package com.baizhi.wd.view;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.baizhi.wd.entity.Person;

public class UpdateQueryOneView extends HttpServlet {
	public void service(HttpServletRequest request,HttpServletResponse response) throws IOException{
		//设置响应类型
		response.setContentType("text/html");
		response.setCharacterEncoding("utf-8");
		//获取输出流
		PrintWriter out = response.getWriter();
		Object object = request.getAttribute("Person");
		Person per = (Person)object;
		//使用输出流
		out.println("<html>");
		out.println("<head>");
		out.println("<meta  http-equiv='Content-Type' content='text/html; charset=utf-8'>");
		out.println("<title>Insert title here</title>");
		out.println("</head>");
		out.println("<body>");
		out.println("当前用户： xxx <a href=''>退出</a><br/>");
		out.println("<form action='/telbook_2/per/updateSaveAction' method='post'>");
		out.println("<input type='hidden' name='id' value='"+per.getId()+"'>");
		out.println("姓名：<input name='username' value='"+per.getName()+"'/><br/>");
		out.println("手机：<input name='mobile' value='"+per.getMobile()+"'/><br/>");
		out.println("座机：<input name='telphone' value='"+per.getTelphone()+"'/><br/>");
		out.println("邮箱：<input name='email' value='"+per.getEmail()+"'/><br/>");
		out.println("城市：<input name='city' value='"+per.getCity()+"'/><br/>");
		out.println("生日：<input name='birthday' value='"+per.getBirthday()+"'/><br/>");
		out.println("<input type='submit' value='修改'/>");
		out.println("<input type='reset' value='重置'/>");
		out.println("</form>");
		out.println("<a href='list.html'>返回</a>");
		out.println("</body>");
		out.println("</html>");	
	}
}
